﻿CREATE PROCEDURE [dbo].[JobsGetFinished]
(@RunID UniqueIdentifier) 
AS begin
	select * from Job where RunID=@RunID and FinishTime is not null and FinishTime<GetDate() and HasError=0 and Cancelled=0;
end